home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / WANET.CMD < prev    next >
Encoding:
Text File  |  1996-02-27  |  2.0 KB  |  114 lines

  1. #     Login.cmd  for  Wave Net
  2. #    WANet Services, Software Design Associates, Inc.
  3. #
  4. #trace on
  5. #
  6. # set up some strings for dialling up
  7. #
  8. if ![load $number]
  9.   if [query $number "Enter WestNet's local phone number"]
  10.     save $number
  11.   end
  12. end
  13. if ![load $username]
  14.   if [username "Enter your login username"]
  15.     save $username
  16.   end
  17. end
  18. if ![load $password]
  19.   if [password "Enter your login password"]
  20.     save $password
  21.   end
  22. end
  23. if ![load $modemsetup]
  24.   if [modemsetup "Enter your modem init string]
  25.     save $modemsetup 
  26.   end
  27. end
  28.  
  29. $prompt = ">"
  30. $userprompt = "ogin:"
  31. $passprompt = "assword:"
  32. $slipcmd = "slip"
  33.  
  34. $addrtarg = "Your address is"
  35. $pppcmd = "ppp"
  36.  
  37. #
  38. #----------------------------------------------------------
  39. #
  40. # initialize modem
  41. #output "ATZ"\13
  42. #if ! [input 10 OK\n]
  43. #  display "Modem is not responding"\n
  44. # abort
  45. # end
  46. #
  47. # setup our modem commands
  48. #
  49. sleep 1
  50. # pause a second for modem to settle after atz
  51. output $modemsetup\13
  52. input 10 OK\n
  53. #
  54. # send phone number
  55. #
  56. %n = 1
  57. repeat
  58. output \13
  59. sleep 2
  60. # send CR and wait 2 seconds for modem to hang up if dialing.
  61. output "atdt"$number\13
  62. %busy = [input 10 BUSY]
  63. sleep 5
  64. # sleep long enough for modem to detect busy and hang up.
  65. if %busy  
  66.   display " attempt "%n" - redialing"\n
  67.   %ok = 0
  68. else
  69.   display \n"Waiting for connection"\n
  70.   %ok = [input 40 CONNECT]
  71. end
  72. %n = %n + 1
  73. until %ok
  74. input 10 \n
  75. #
  76. #  wait till it's safe to send because some modems hang up
  77. #  if you transmit during the connection phase
  78. #
  79. wait 30 dcd
  80. #
  81. # now prod the terminal server
  82. #
  83. output \13
  84. #
  85. #  wait for the username prompt
  86. #
  87. input 30 $userprompt
  88. output ppp:$username\13
  89. #
  90. # and the password
  91. #
  92. input 30 $passprompt
  93. output $password\13
  94. #
  95. # we are now logged in
  96. #
  97. # wait for the address string
  98. #
  99. input 30 to
  100. #
  101. # parse address
  102. #
  103. address 40
  104. #
  105. # we are now connected, logged in and in slip mode.
  106. #
  107.   display \n
  108.   display Connected.  Your IP address is \i.\n
  109. sleep 1
  110. end
  111. #
  112. # now we are finished.
  113. #
  114.